package branchws;

import java.util.List;
import java.util.ArrayList;
import javax.jws.WebService;
import javax.jws.WebMethod;

/**
 *
 * @author Atuan
 */
@WebService(serviceName = "BranchHQWS")
public class BranchHQWS {
    
    private IBranchHQDB dbh;

    public BranchHQWS() {
        this.dbh = new DBHandler();
    }    
    
    @WebMethod(operationName = "getOrdersData")
    public List<Order> getOrdersDataForHQ(int branchID) {
        List<Order> orders = new ArrayList<Order>();
//        orders = dbh.getOrders("NO");
//        for(int i = 0; i < orders.size(); i++)
//        {
//            System.out.println("ID: "+orders.get(i).getId());
//        }
        //System.out.println("LALA:A");
        orders = dbh.getOrders("YES");
//        for(int i = 0; i < orders.size(); i++)
//        {
//            System.out.println("ID: "+orders.get(i).getId());
//        }
        return orders;
    }
    
}
